//
//  UINavigationController+Extension.m
//  DFKit
//
//  Created by rujia chen on 17/6/13.
//  Copyright © 2017年 chenrj90. All rights reserved.
//

#import "UINavigationController+Extension.h"

@implementation UINavigationController (Extension)

+ (void)load {
    [self df_swizzleMethod:@selector(pushViewController:animated:) withMethod:@selector(_pushViewController:animated:) error:nil];
}

#pragma mark - swizzle

- (void)_pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES ;
    }
    [self _pushViewController:viewController animated:YES];
}

@end
